﻿using Adnc.Application.Shared.Dtos;
using Adnc.Application.Shared.Interceptors;
using Adnc.Application.Shared.Services;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using WYT.Ord.Application.Contracts.Dtos.Order;

namespace WYT.Ord.Application.Contracts.Services
{
    /// <summary>
    /// 订单服务
    /// </summary>
    public interface IOrderAppService : IAppService
    {
        /// <summary>
        /// 创建订单
        /// </summary>
        /// <param name="usreid"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        //[UnitOfWork]
        Task<AppSrvResult<long>> OrderCreate(long usreid, OrderCreationDto input);

        /// <summary>
        /// 获取订单详情
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<AppSrvResult<OrderDetailDto>> GetOrderDetail(long orderId);

        /// <summary>
        /// 修改订单状态
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult> ChangeOrderState(OrderStateModifyDto input);

        /// <summary>
        /// 订单列表查询
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="searchPagedDto"></param>
        /// <returns></returns>
        Task<AppSrvResult<PageModelDto<OrderListDto>>> OrderListSearch(long userid, SearchPagedDto<int> searchPagedDto);

        /// <summary>
        /// 推送商品到ERP
        /// </summary>
        /// <param name="orderId"></param>
        /// <returns></returns>
        Task<AppSrvResult> TasksAfterExwarehouseComplete(long orderId);

        /// <summary>
        /// ERP回调
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult> ErpCallBack(ERPCallbackDto input);

        /// <summary>
        /// 物流查询
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult<List<LogisticsTrackingDto>>> LogisticsTracking(long input);

        /// <summary>
        /// 收货确认
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult> ReceiptConfirmation(long input);

        /// <summary>
        /// 添加评论
        /// </summary>
        /// <param name="userId"></param>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<AppSrvResult> AddReview(long userId, GoodsReviewAddDto input);

        /// <summary>
        /// 订单检查
        /// </summary>
        /// <returns></returns>
        Task<AppSrvResult> OrderCheck();
    }
}
